<template>
	<view>
		<u-tabbar :list="tabBarList" :active-color="activeColor" :inactive-color="inactiveColor" :height="84"
			:border-top="borderTop">
		</u-tabbar>
	</view>
</template>
<script>
	import store from '@/store'
	export default {
		props: {
			tabBarList: {
				type: Array,
				default: uni.getStorageSync('tabBarList')
			}
		},
		data() {
			return {
				borderTop: true,
				inactiveColor: '#909399',
				activeColor: '#328CFA',
			}
		},
	}
</script>

<template>
	<view class="body">
		<u-tabbar v-model="current" :before-switch="beforeSwitch" active-color="#1d6869" :list="tabarList"></u-tabbar>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from "vuex";


	export default {
		components: {},
		data() {
			return {};
		},
		computed: {
			...mapState(["tabarList"]),
		},
		onLoad() {},

		methods: {
			...mapMutations(["setTabarList"]),
			beforeSwitch(index) {
				if (this.tabarList[index].text == "客服") {
					this.kfshow = true;
					return false;
				} else {
					return true;
				}
			},
		}
	};
</script>

<style lang="scss" scoped>
</style>
